/*
============================================================================
 Name        : PdTimer.h
 Author      : Jian(raphyer@hotmail.com)
 Version     :
 Copyright   : GPL
 Description : CPdTimer declaration
============================================================================
*/

#ifndef PDTIMER_H
#define PDTIMER_H

// INCLUDES
#include <e32std.h>
#include <e32base.h>
#include "pd_timer.h"


/**
*  CPdTimer
* 
*/
class CPdTimer : public CTimer
{
public:  // Constructors and destructor

	~CPdTimer();

	static CPdTimer* NewL(pd_timer_type aType);

private:

	CPdTimer(pd_timer_type aType);

	void _initL();

public:
    
    void Start(DD_UINT time_millisecond, pd_timer_callback callback, void* ptr) ;
    
    void Stop() ;

private:

    virtual void RunL();

    virtual TInt RunError(TInt aError) ;

private:  // Data 
    pd_timer_type     iType ;
    TInt              iTimerTime ;
    pd_timer_callback iCallBack ;
    void*             iSavePtr ;
};

#endif // PDTIMER_H

/* End of File */
